package fire.and.near.challenger.fragments;

import java.util.List;

import fire.and.near.challenger.database.FriendModel;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

public class FriendsListAdapter extends ArrayAdapter<FriendModel> {
	
	private List<FriendModel> friendsList = null;

	public FriendsListAdapter(Context context, int resource,
			List<FriendModel> objects) {
		super(context, resource, objects);
		
	}
	
	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		View v = convertView;
		
		if(v == null) {
			v = new TextView(getContext());
			((TextView) v).setText(getItem(position).getName());
		} else {
			((TextView) v).setText(getItem(position).getName());
		}
		
		return v;
	}

}
